Automatic milking takes place in a milking parlor which is provided with a milking robot typically comprising a robot arm functioning as a carrier of one or several teat cups to be applied to the teats of an animal's udder. The teats are located by means of one or several sensors, whereupon the robot arm--swung from a side of the milking parlor to underneath the animal--can be positioned so that through an upward movement of an appropriate teat cup that teat cup is applied to a teat of the animal's udder.